﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using ChurchWebsite.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ChurchWebsite.Areas.Admin.Controllers
{
    public class MasterController : BaseController
    {
        //
        // GET: /Admin/Master/

        public ActionResult Index()
        {
            return View();
        }
        public ActionResult ChurchBoards()
        {
            return View();
        }
        public JsonResult AddChurchBoards(EntityChurchBoard ChurchBoard)
        {
            return Json(new BLL_Church().AddChurchBoard(ChurchBoard), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateChurchBoards(EntityChurchBoard ChurchBoard)
        {
            return Json(new BLL_Church().UpdateChurchBoard(ChurchBoard), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteChurchBoards(Guid dataId)
        {
            return Json(new BLL_Church().DeleteChurchBoard(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchBoard(Guid dataId)
        {
            return Json(new BLL_Church().GetChurchBoard(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchBoards()
        {
            return Json(new BLL_Church().GetChurchBoard(), JsonRequestBehavior.AllowGet);
        }
        public ActionResult ChurchBoardsJobtitle()
        {
            return View();
        }
        public JsonResult GetChurchBoardJobtitles()
        {
            return Json(new BLL_Church().GetChurchBoardJobtitle(), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchBoardJobtitleByBoardId(Guid dataId)
        {
            return Json(new BLL_Church().GetChurchBoardJobtitlebyBoardId(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchBoardAssignedJobtitle(Guid dataId)
        {
            return Json(new BLL_Church().GetChurchBoardAssignedJobtitle(dataId), JsonRequestBehavior.AllowGet);
        }

        

        public JsonResult AddChurchBoardJobtitle(EntityChurchBoardJobtitle ChurchBoardJobtitle)
        {
            return Json(new BLL_Church().AddChurchBoardJobtitle(ChurchBoardJobtitle), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateChurchBoardJobtitle(EntityChurchBoardJobtitle ChurchBoardJobtitle)
        {
            return Json(new BLL_Church().UpdateChurchBoardJobtitle(ChurchBoardJobtitle), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteChurchBoardJobtitle(Guid dataId)
        {
            return Json(new BLL_Church().DeleteChurchBoardJobtitle(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchBoardJobtitle(Guid dataId)
        {
            return Json(new BLL_Church().GetChurchBoardJobtitle(dataId), JsonRequestBehavior.AllowGet);
        }
        public ActionResult ChurchJobtitleRole()
        {
            return View();
        }
        public JsonResult GetMenus()
        {
            return Json(new BLL_Menu().GetMenu(),JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchJobtitleRoles()
        {
            return Json(new BLL_Church().GetJobtitleRole(), JsonRequestBehavior.AllowGet);
        } 
        public JsonResult UpdateChurchJobtitleRole(EntityChurchJobtitleRole JobtitleRole)
        {
            return Json(new BLL_Church().UpdateJobtitleRole(JobtitleRole), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteChurchJobtitleRole(Guid dataId)
        {
            return Json(new BLL_Church().DeleteJobtitleRole(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetChurchJobtitleRole(Guid dataId)
        {
            return Json(new BLL_Church().GetJobtitleRole(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult AddChurchJobtitleRoles(EntityChurchJobtitleRole JobtitleRole)
        {
            return Json(new BLL_Church().InsertJobtitleRole(JobtitleRole), JsonRequestBehavior.AllowGet);
        }
    }
}
